home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_11 / pjp / osflush.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-02  |  310 b   |  16 lines

  1. ---------- Listing 9: The file osflush.c -------------------
  2.  
  3. // osflush -- ostream::flush() 
  4. #include <ostream> 
  5.  
  6. ostream& ostream::flush() 
  7.     {    // drain any buffered output 
  8.     _TRY_IO_BEGIN 
  9.     if (good() && rdbuf()->pubsync() == EOF) 
  10.         setstate(badbit); 
  11.     _CATCH_IO_END 
  12.     return (*this); 
  13.     }
  14.  
  15.  
  16.